import request from './request'

// 获取客户列表
export const getCustomerList = (params) => {
  return request({
    url: '/customers',
    method: 'GET',
    params
  })
}

// 添加客户
export const addCustomer = (data) => {
  return request({
    url: '/customers',
    method: 'POST',
    data
  })
}

// 根据ID查询客户
export const getCustomerById = (id) => {
  return request({
    url: `/customers/${id}`,
    method: 'GET'
  })
}

// 修改客户
export const updateCustomer = (data) => {
  return request({
    url: '/customers',
    method: 'PUT',
    data
  })
}